# -*- coding:UTF-8 -*-
"""
@Project : pythonProject
@File    : decorator_demo.py
@IDE     : PyCharm
@Author  : WorldWind(1772830365@qq.com)
@Address : China - HeiLongjiang - Herbin
@Date    : 2025/7/15 下午8:48
"""
from highLevelPython.July15_class_code.decorator_my_practice.decorator.decorator01 import decorator
from highLevelPython.July15_class_code.decorator_my_practice.decorator.decorator01 import running_time


class TaoBao:
    def __init__(self):
        print(f'This is __init__ method. {self.get_class_name()} class startup')

    @running_time #测试时间装饰器
    @decorator #测试登录装饰器
    def post(self):
        print('此方法需要检测是否登录,使用装饰器进行检验!')

    @classmethod
    def get_class_name(cls):
        return cls.__name__

    def __del__(self):
        print(f'This is __del__ method. The {self.get_class_name()} class has been recycled')


if __name__ == '__main__':
    t = TaoBao()
    t.post()
